home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Macintosh Programmer’s Workshop / MPW 3.1 / MPW / Interfaces / CIncludes / OSEvents.h < prev    next >
Text File  |  1990-12-13  |  1KB  |  59 lines

  1. /************************************************************
  2.  
  3. Created: Thursday, September 7, 1989 at 5:11 PM
  4.     OSEvents.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.    1985-1989
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __OSEVENTS__
  15. #define __OSEVENTS__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifndef __EVENTS__
  22. #include <Events.h>
  23. #endif
  24.  
  25. #ifndef __OSUTILS__
  26. #include <OSUtils.h>
  27. #endif
  28.  
  29. struct EvQEl {
  30.     QElemPtr qLink;
  31.     short qType;
  32.     short evtQWhat;     /*this part is identical to the EventRecord as...*/
  33.     long evtQMessage;    /*defined in ToolIntf*/
  34.     long evtQWhen;
  35.     Point evtQWhere;
  36.     short evtQModifiers;
  37. };
  38.  
  39. typedef struct EvQEl EvQEl;
  40. typedef EvQEl *EvQElPtr;
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45. pascal OSErr PostEvent(short eventNum,long eventMsg);
  46. pascal OSErr PPostEvent(short eventCode,long eventMsg,EvQElPtr *qEl);
  47. pascal Boolean OSEventAvail(short mask,EventRecord *theEvent);
  48. pascal Boolean GetOSEvent(short mask,EventRecord *theEvent);
  49. pascal void FlushEvents(short whichMask,short stopMask)
  50.     = {0x201F,0xA032};
  51. pascal void SetEventMask(short theMask)
  52.     = {0x31DF,0x0144};
  53. pascal QHdrPtr GetEvQHdr(void); 
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57.  
  58. #endif
  59.